
import { _decorator, Component, Node, Sprite } from 'cc';
import Loader from '../../Script/Common/Loader';
import yyComponent from '../../Script/Common/yyComponent';
const { ccclass, property } = _decorator;

@ccclass('LoopListItem')
export class LoopListItem extends yyComponent {

    protected setData(url) {
        this.setImg(url);
    }

    @property(Sprite)
    protected img: Sprite = null;

    protected setImg(url) {
        Loader.loadBundleRes("UI", "mapImg/" + url + "/spriteFrame", (res) => {
            this.img.spriteFrame = res;
        });
    }

}

